﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NLog;

namespace Sonic.Framework
{
    public class NLogSingleton
    {
        private static NLogSingleton _instance = null;

        public static NLogSingleton Instance {
            get
            {
                if (_instance == null)
                {
                    _instance = new NLogSingleton();
                }

                return _instance;
            }
        }

        private static string _loggerName = "";
        
        public static void SetLoggerName(string name)
        {
            _loggerName = name;
        }

        /// <summary>
        /// An instance of a logger for writing out debug information
        /// </summary>
        public Logger Logger
        {
            get
            {
                return NLog.LogManager.GetLogger(_loggerName);
            }
        }
    }
}
